import { useRoutes } from "react-router-dom";

import Layout from "../view/Layout/Layout";
import {menuroute} from "./menuroute";
import Chuan from "../view/Chuan/Chuan";
import ChuanT from "../view/Chuan/ChuanT";







function Routers() {
  const element = useRoutes([
    {
      path: "/",
      element: <Layout />,
      children: menuroute
    },
      {
          path: "/chuan",
          element: <Chuan />,
        },
      {
          path: "/chuan",
          element: <Chuan />,
        },
      {
          path: "/chuant/:id",
          element: <ChuanT />,
        },
  ]);

  return element;
}

export default Routers